import LoginPage from '@/views/LoginPage/Layout'

export default [
    {
        path:"/",
        redirect:"/login"
    },
    {
        path:"/login",
        name:"login",
        component:LoginPage,
        meta:{
            public:true
        }
    },
    {
        path:"/home",
        name:"home",
        component:()=>import(/* webpackChunkName: "home" */ "@/views/HomePage/Layout"),
        children:[
            { 
                path:"users",
                name:"users",
                component:()=>import(/* webpackChunkName: "users" */ "@/views/HomePage/pages/UserPage") 
            },
            { 
                path:"roles",
                name:"roles",
                component:()=>import(/* webpachChunkName: "roles" */ "@/views/HomePage/pages/RolesPage")
            },
            {
                path:"rights",
                name:"rights",
                component:()=>import( /* webpckChunkName:"rights" */ "@/views/HomePage/pages/RightsPage" )
            },
            {
                path:"goods",
                name:"goods",
                component:()=>import( /* webpckChunkName:"goods" */ "@/views/HomePage/pages/GoodPage" )
            },
            {
                path:"categories",
                name:"categories",
                component:()=>import( /* webpckChunkName:"categories" */ "@/views/HomePage/pages/CategoriesPage" )
            },
            {
                path:"orders",
                name:"orders",
                component:()=>import( /* webpckChunkName:"orders" */ "@/views/HomePage/pages/OrderPage" )
            },
            {
                path:"params",
                name:"params",
                component:()=>import( /* webpckChunkName:"params" */ "@/views/HomePage/pages/ParamsPage" )
            },
            { 
                path:"*",
                name:"not",
                component:()=>import(/* webpackChunkName: "notfoun" */ "@/views/HomePage/pages/PageNotFound") 
            }
        ]
    },
    {
        path:"/*",
        redirect:"/login"
    }
]